﻿using System;
using UnityEngine;

namespace HKTools
{
    public abstract class HK_BasePanelAnim : HKUIFramework_BaseController
    {
        CanvasGroup cg;
        public CanvasGroup CG
        {
            get
            {
                if (cg == null)
                    cg = GetComponent<CanvasGroup>();

                return cg;
            }
        }

        RectTransform rtf;
        public RectTransform RTF
        {
            get
            {
                if (rtf == null)
                    rtf = GetComponent<RectTransform>();

                return rtf;
            }
        }

        /// <summary>
        /// 面板 动画初始化
        /// </summary>
        public abstract void OnInitAnim();

        /// <summary>
        /// 面板 开启动画
        /// </summary>
        public abstract void OnOpenAnim();

        /// <summary>
        /// 面板 关闭动画
        /// </summary>
        public abstract void OnCloseAnim();

        /// <summary>
        /// 面板 暂停动画
        /// </summary>
        public abstract void OnPauseAnim();

        /// <summary>
        /// 面板 恢复动画
        /// </summary>
        public abstract void OnResumeAnim();
    }
}